package com.sniper.springmvc.mybatis.service.impl;

import com.sniper.springmvc.model.JyzxReceive;
import com.sniper.springmvc.mybatis.dao.BaseDao;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by suzhen on 2017/4/7.
 */
@Service("jyzxReceiveService")
public class JyzxReceiveServiceImpl extends BaseServiceImpl<JyzxReceive> implements JyzxReceiveService {

    @Resource(name = "jyzxReceiveDao")
    @Override
    public void setDao(BaseDao<JyzxReceive> dao) {
        super.setDao(dao);
    }

    @Override
    public JyzxReceive getReceive(String value, String field) {
        Map<String, Object> params = new HashMap<>();
        params.put("value", value);
        params.put("field", field);
        return (JyzxReceive) this.find("find", params);
    }
}
